/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package za.ac.cput.kleintjes.birthdate.Impl;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import za.ac.cput.kleintjes.birthdate.Birthdate;

/**
 * @author Administrator
 */

public class BirthdateImpl implements Birthdate {

    private Date userBirthday;
    private DateFormat dateFormating;
    
    @Override
    public long daysTillBirthday(Calendar endDate)  {
        
        long daysLong = (System.currentTimeMillis() - endDate.getTime().getTime());
        daysLong = daysLong / (1000 * 60 * 60 * 24);
        
        return daysLong; 
    }
    
    @Override
    public boolean isValidDay(int day) {
        if(day>0 && day<=31)
            return true;
        else
            return false;
    }
    
    @Override
    public boolean isValidMonth(int day) {
        if(day>0 && day<=12)
            return true;
        else
            return false;
    }
    
}   
    